package com.xu.chapter01;

/**
 *
 * @author xudenghui
 * @create 2023-06-16 10:52
 **/
public class TestDecorator {
    public static void main(String[] args) {
        ConcretcComponent c = new ConcretcComponent();
        ConcreteDecoratorA d1 = new ConcreteDecoratorA();
        ConcreteDecoratorB d2 = new ConcreteDecoratorB();
        d1.setComponent(c);
        d2.setComponent(c);
        d1.Operation();
        d2.Operation();
    }
}
